<include file="Public:header" />
<script type="text/javascript">
    $(function(){
        $('#old_pwd').focus();
        $('#tijiao').click(function(){
            var old_pwd=$('#old_pwd').val();
            var new_pwd=$('#new_pwd').val();
            var new_pwd1=$('#new_pwd1').val();
            if(check(old_pwd,new_pwd,new_pwd1)){
                $('#pop').load("{:U('sysmanger/save_edit_pwd')}",{'old_pwd':old_pwd,'new_pwd':new_pwd});
            }
        });


        function check(old_pwd,new_pwd,new_pwd1){
            if(old_pwd==''){
                $('#pop').html('<font color="red">原始密码不能为空！请填写原密码！</font>');
                $('#old_pwd').focus();
                return false;
            }
            if(new_pwd==''){
                $('#pop').html('<font color="red">新密码不能为空！请填写新密码！</font>');
                $('#new_pwd').focus();
                return false;
            }
            if(new_pwd!=new_pwd1){
                $('#pop').html('<font color="red">新密码两次输入不一致！请重新输入！</font>');
                $('#new_pwd').val('');
                $('#new_pwd1').val('');
                $('#new_pwd').focus();
                return false;
            }
            if(old_pwd==new_pwd){
                $('#pop').html('<font color="red">新密码与旧密码一致，无需修改密码！</font>');
                $('#old_pwd').focus();
                $('#new_pwd').val('');
                $('#new_pwd1').val('');
                return false;
            }
            return true;
        }



        $('#pop').ajaxStart(function(){
            $('#pop').html('<font color="red">数据处理中...请稍后...</font>');
        });
    });
</script>
<div style="margin-top: 30px;margin-left: 20px;">
    <b>修改管理密码：</b>
    <br><a id="pop"></a><br>
　　原密码：<input type="password" class="input_border" name="old_pwd" id="old_pwd" value="" size="15" maxlength="20" /><br>
　　新密码：<input type="password" class="input_border" name="new_pwd" id="new_pwd" value="" size="15" maxlength="20" />(最长20位)<br>
确认新密码：<input type="password" class="input_border" name="new_pwd1" id="new_pwd1" value="" size="15" maxlength="20" /><br>
    <br>
    <img src="__ROOT__/images/ok.gif" border="0" style="cursor: pointer;margin-left: 100px;" id="tijiao" />

</div>

<include file="Public:ender" />
